export default {
  inserted(el, binding) {
    el.addEventListener('error', () => {
      console.log('图片出错了', binding)
      el.src = binding.value
    })
    el.src = el.src ? el.src : binding.value
  },
  componentUpdated(el, binding) {
    el.addEventListener('error', () => {
      console.log('图片出错了', binding)
      el.src = binding.value
    })
    el.src = el.src ? el.src : binding.value
  }
}
